package com.app.mapper;


import com.app.model.OutgoingStatisticsModel;
import com.app.model.PersonModel;
import com.app.vo.NameAndValueVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
@Mapper
public interface PersonMapper extends BaseMapper<PersonModel> {

    void batchInsertPerson(@Param("list") List<PersonModel> list);

    List<OutgoingStatisticsModel> getCountByDepartment(@Param("startTime") String startTime,@Param("endTime") String endTime);

    List<OutgoingStatisticsModel> getCountByPersonType(@Param("startTime") String startTime,@Param("endTime") String endTime);

    /**
     * 政治面貌饼状图查询
     * @return
     */
    List<NameAndValueVo> zzmmPieCount();

    /**
     * 学历饼状图统计
     * @return
     */
    List<NameAndValueVo> educationTextPieCount();
    /**
     * 岗位级别饼状图
     * @return
     */
    List<NameAndValueVo> positionLevelPieCount();
    /**
     * 干部衔级饼状图
     * @return
     */
    List<NameAndValueVo> officerPieCount();

    /**
     * 人员类型饼状图
     * @return
     */
    List<NameAndValueVo> personTypePieCount();

    /**
     * 士兵衔级饼状图
     * @return
     */
    List<NameAndValueVo> soldierRankTitlePieCount();

    /**
     *人员的批量假删除
     * @param idsList
     */
    void updateBacheByIds(@Param("idsList") List<Integer> idsList, @Param("person_status") Integer person_status);

    /**
     * 批量更新对象
     * @param list
     * @param updateIdsList
     */
//    void updateBatchByIds(@Param("list") List<PersonModel> list, @Param("updateIdsList") List<Integer> updateIdsList);

}
